/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package multimedia;

import MVC.IModel;
import java.util.ArrayList;

/**
 *
 * @author thomas
 */
public class AudioPlaylistModel implements IModel {

    private String _myName = "";
    private String _myState = "stop";
    
    private int _currentIndex = 0;
    private int _totalIndex = 0;
    
    private AudioSongModel _myCurrentSong = new AudioSongModel();
    private ArrayList<AudioSongModel> _mySongs = new ArrayList<AudioSongModel>();

    public AudioPlaylistModel() {
    }

    /**
     * @return the _myName
     */
    public String getName() {
        return _myName;
    }

    /**
     * @param myName the _myName to set
     */
    public void setName(String myName) {
        this._myName = myName;
    }

    public void setCurrentIndex(int index) {
        _currentIndex = index;
    }
    
    /**
     * @return the _myCurrentSong
     */
    public AudioSongModel getCurrentSong() {
        return _mySongs.get(_currentIndex);
    }

    /**
     * @return the _mySongs
     */
    public ArrayList<AudioSongModel> getSongs() {
        return _mySongs;
    }

    /**
     * Add a song to the ArrayList
     * @param song 
     */
    public void addSong(AudioSongModel song) {
        _mySongs.add(song);
        _totalIndex += 1;
    }

    /**
     * @return the _myState
     */
    public String getState() {
        return _myState;
    }

    /**
     * @param myState the _myState to set
     */
    public void setState(String myState) {
        this._myState = myState;
    }

    @Override
    public String toString() {
        return _myName;
    }
}
